home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgramD2.iso
/
Borland
/
Borland C++ For TASM
/
USRGUIDE.PAK
/
CALLCT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-21
|
725b
|
27 lines
/* Turbo Assembler example. Copyright (c) 1993 By Borland International, Inc.
CALLCT.CPP
Program to invoke the LineCount function in COUNT.ASM.
Usage: bcc callct.cpp count.asm
bcc -ml callct.cpp countlg.asm
From the Turbo Assembler User's Guide
Ch. 18: Interfacing Turbo Assembler with Borland C++
*/
#include <stdio.h>
char * TestString="Line 1\nline 2\nline 3";
extern "C" unsigned int LineCount(char * StringToCount,
unsigned int * CharacterCountPtr);
int main()
{
unsigned int LCount;
unsigned int CCount;
LCount = LineCount(TestString, &CCount);
printf("Lines: %d\nCharacters: %d\n", LCount, CCount);
return 0;
}